home *** CD-ROM | disk | FTP | other *** search
/ Adventures with Oslo: Tools & Gadgets / Adventures with Oslo - Tools and Gadgets.ISO / pc / program / studio / studio.dir / 00018_random fun.ls < prev    next >
Encoding:
Text File  |  1994-09-23  |  4.0 KB  |  144 lines

  1. on mouseUp
  2.   set the castNum of sprite 2 to the number of cast "markers"
  3.   set choice to random(6)
  4.   if choice = 1 then
  5.     playMarkers()
  6.   else
  7.     if choice = 2 then
  8.       mixMarkers()
  9.     else
  10.       if choice = 3 then
  11.         hero()
  12.       else
  13.         if choice = 4 then
  14.           rocket()
  15.         else
  16.           if choice = 5 then
  17.             catipillar()
  18.           else
  19.             fishy()
  20.           end if
  21.         end if
  22.       end if
  23.     end if
  24.   end if
  25. end
  26.  
  27. on playMarkers
  28.   set first to the number of cast "first light"
  29.   set last to the number of cast "last light"
  30.   preLoadCast(first, last)
  31.   puppetSound("Glissando")
  32.   set the castNum of sprite 2 to the number of cast "all dark"
  33.   set the locH of sprite 30 to the locH of sprite 30 - 100
  34.   updateStage()
  35.   wait(45)
  36.   repeat with i = 1 to 20
  37.     set the castNum of sprite 30 to the castNum of sprite 30 + 1
  38.     updateStage()
  39.     wait(2)
  40.   end repeat
  41.   set the castNum of sprite 2 to the number of cast "markers"
  42.   set the castNum of sprite 30 to the number of cast "first light"
  43.   set the locH of sprite 30 to the locH of sprite 30 + 100
  44.   updateStage()
  45.   unLoadCast(first, last)
  46. end
  47.  
  48. on mixMarkers
  49.   puppetSound("Alien Gun.S")
  50.   repeat with i = 1 to 3
  51.     set the castNum of sprite 2 to the number of cast "wrong markers"
  52.     updateStage()
  53.     set the castNum of sprite 2 to the number of cast "markers"
  54.     updateStage()
  55.   end repeat
  56.   set the castNum of sprite 2 to the number of cast "wrong markers"
  57.   updateStage()
  58. end
  59.  
  60. on hero
  61.   set the locV of sprite 31 to the locV of sprite 31 - 200
  62.   puppetSound("Fanfare Announcement.S")
  63.   updateStage()
  64.   wait(15)
  65.   repeat with i = 1 to 2
  66.     set the castNum of sprite 31 to the castNum of sprite 31 + 1
  67.     updateStage()
  68.     wait(25)
  69.   end repeat
  70.   set the locV of sprite 31 to the locV of sprite 31 + 200
  71.   set the castNum of sprite 31 to the number of cast "first hero"
  72.   updateStage()
  73. end
  74.  
  75. on rocket
  76.   set temp1 to the locV of sprite 32
  77.   set temp2 to the locV of sprite 33
  78.   set the locV of sprite 33 to the locV of sprite 33 - 150
  79.   updateStage()
  80.   wait(30)
  81.   set the locV of sprite 32 to the locV of sprite 32 - 150
  82.   puppetSound("Slow Rocket Takeoff.S")
  83.   updateStage()
  84.   wait(15)
  85.   repeat with i = 1 to 20
  86.     set the locV of sprite 32 to the locV of sprite 32 - (i * 3)
  87.     set the locV of sprite 33 to the locV of sprite 33 - (i * 3)
  88.     if the castNum of sprite 32 = the number of cast "last fume" then
  89.       set the castNum of sprite 32 to the number of cast "first fume"
  90.     else
  91.       set the castNum of sprite 32 to the castNum of sprite 32 + 1
  92.     end if
  93.     updateStage()
  94.     wait(5)
  95.   end repeat
  96.   set the locV of sprite 32 to temp1
  97.   set the locV of sprite 33 to temp2
  98. end
  99.  
  100. on catipillar
  101.   puppetSound("African Syncopation.S")
  102.   repeat with i = 1 to 8
  103.     if the castNum of sprite 34 = the number of cast "last cat" then
  104.       set the castNum of sprite 34 to the number of cast "first cat"
  105.     else
  106.       set the castNum of sprite 34 to the castNum of sprite 34 + 1
  107.     end if
  108.     set the locH of sprite 34 to the locH of sprite 34 - 20
  109.     updateStage()
  110.     wait(15)
  111.   end repeat
  112.   set the castNum of sprite 34 to the number of cast "cat looks"
  113.   updateStage()
  114.   wait(30)
  115.   puppetSound("African Syncopation.S")
  116.   repeat with i = 1 to 8
  117.     if the castNum of sprite 34 = the number of cast "first cat" then
  118.       set the castNum of sprite 34 to the number of cast "last cat"
  119.     else
  120.       set the castNum of sprite 34 to the castNum of sprite 34 - 1
  121.     end if
  122.     set the locH of sprite 34 to the locH of sprite 34 + 20
  123.     updateStage()
  124.     wait(15)
  125.   end repeat
  126. end
  127.  
  128. on fishy
  129.   puppetSound("Walking")
  130.   repeat with i = 1 to 15
  131.     set the locH of sprite 35 to the locH of sprite 35 - 50
  132.     if the castNum of sprite 35 = the number of cast "last fishy" then
  133.       set the castNum of sprite 35 to the number of cast "first fishy"
  134.     else
  135.       set the castNum of sprite 35 to the castNum of sprite 35 + 1
  136.     end if
  137.     updateStage()
  138.     wait(10)
  139.   end repeat
  140.   set the locH of sprite 35 to the locH of sprite 35 + 750
  141.   set the castNum of sprite 35 to the number of cast "first fishy"
  142.   updateStage()
  143. end
  144.